package lab10.com.acme;

public abstract class AbstractAccount implements Account
{
	protected int id;
	protected double balance;
	
	public AbstractAccount(final double amount)
	{
		id = this.hashCode();
		balance = amount;
	}
	
	public abstract void deposit(final double amount);

	public abstract void withdraw(final double amount);
	
	public double getBalance()
	{
		return balance;
	}
	
	public int getID()
	{
		return id;
	}

	@Override
	public String toString()
	{
		String acc = "ID: " + id + "\tbalance: " + balance;  
		return acc;
	}
}
